/*
 * PetRewardResource.h
 *
 *  Created on: 2013. 9. 9.
 *      Author: mega@gamevil.com
 */

#ifndef PETREWARDRESOURCE_H_
#define PETREWARDRESOURCE_H_

#include <map>

namespace ProjectZ { namespace NResource {

class PetRewardData
{
public:
	struct Flyweight
	{
		int _PC_LEVEL;
		int _R_PET1;
		int _R_PET2;
		int _R_PET3;
		int _R_PET4;
		int _R_PET_MIN_LV;
		int _R_PET_MAX_LV;
	};

public:
	PetRewardData() {};
	virtual ~PetRewardData();

	bool LoadResource(int company, int saleCode);
	Flyweight * GetFly(int level);

private:
	typedef std::map<int, Flyweight *>	DATATREE;
	DATATREE	clsFlyTree;
};


class PetRewardResource
{
public:
	PetRewardResource();
	virtual ~PetRewardResource();

	bool LoadResource();
	PetRewardData::Flyweight * GetFly(int company, int saleCode, int level);

private:
	PetRewardData * pPetRewardAndroid;
	PetRewardData * pPetRewardIOS;
};

} /* NResource */ } /* ProjectZ */

#endif /* PETREWARDRESOURCE_H_ */
